<%@ page import="applicationModel.Fila"%>
<%@ page import="dominio.Planta" %>
<%@ page import= "busqueda.ZombieBusqueda" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

</head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	
	<r:require modules="bootstrap"/>
	<r:layoutResources/>
	
	<g:javascript library="application" /> 
<modalbox:modalIncludes />

	
					

</head>
<body>

<script>
	function almanaque_zombie() {
	window.open('almanaque_zombie','almanaque_zombie','width=900px, height=500px') ;
	}
</script>

<script>
	function j_acuatico() {
	window.open('j_acuatico','j_acuatico','width=900px, height=700px') ;
	}
</script>

<div id="contenedor" style="margin-left:20px; width:800px; length:900px">
<div id="header" style="margin-left:20px">
<table><tr><td><img src="${resource(dir:'images',file:'pvz_logo1.jpg')}" class="pull-left" height="100" width="145"/>
<h1 id="titulo"></h1></td></tr>
<tr><td><h3>Jugador:</h3> <input type="text" placeholder="Escriba su Nombre"><h3>Dinero:</h3><input type="text" placeholder="Dinero"></td></tr></table>
</div>
<div id="tablaGrillaJardin">
	<hr/>
<TABLE class="table">
<thead>
			<th>Fila N°</th>
			<th>Terreno</th>
			<th>Plantas</th>
		</thead>


<tbody>
<g:each in="${filasList}" status="i" var="fila">
				<g:set var="idFila" value="${i}" />
				<g:set var="fila" value="${fila}" />
	<tr class="${(i % 2) == 0 ? '' : 'info'}">
	<td>
	${i+1}
	</td>
	<td>
	${fila.tipo}
	</td>
	<td style="text-align: right;">
	${fila.plantas}
	</tr> 
</g:each>
	</tbody>
</TABLE></div>

<TABLE class="table">
<tr>
<form  method="post">
	<div id="comboFilas">
				<select class="span4" id="filaSeleccionada" name="filaSeleccionada">
					<g:each in="${filasList}" status="i" var="fila">
						<option value="${i}">Fila N°${i+1}</option>
					</g:each>
				</select>
			</div> 
	<div class="modal-footer"  style="margin-left:20px">
	 	<g:actionSubmit value="Plantar" action="plantar" controller="juego" class="btn btn-success" Style = "margin-top:10px;"/>
	 	<g:actionSubmit value="Atacar" action="atacar" controller="juego" class="btn btn-danger" Style = "margin-top:10px;"/>
	    </div>

</form>
</tr>
</TABLE>

<div id="footer" style="margin-left:20px">

<button type="submit" class="btn btn-warning" onClick="j_acuatico()" style="float:left">Jardin Zen</button>
			
<button type="submit" class="btn btn-warning" onclick="almanaque_zombie()" style="margin-left:5px">Almanaque Zombie</button>

</div>
</div>
</body>
</HTML>